<div style="width: 500px;">
<form id="ajax_form" onsubmit="return CompanyAddress.processAddress();">
	<table class="table">
		<tbody>
			<tr>
				<td class="right rlabel"><label for="idcountry"><?php echo $this->lang->line('address_country'); ?>:</label></td>
				<td colspan="3"><div id="ajaxCountry"></div></td>
			</tr>
			<tr>
				<td class="right rlabel"><label for="zipcode"><?php echo $this->lang->line('address_zipcode'); ?>:</label></td>
				<td colspan="3">
					<input type="text" size="9" class="input maskCEP" value="<?php echo $zipcode; ?>" id="zipcode" name="zipcode" onblur="getZipCodeAddress();" />
				</td>
			</tr>
			<tr>
				<td class="right rlabel"><label for="idstate"><?php echo $this->lang->line('address_state'); ?>:</label></td>
				<td colspan="3"><div id="ajaxState"></div></td>
			</tr>
			<tr>
				<td class="right rlabel"><label for="city"><?php echo $this->lang->line('address_city'); ?>:</label></td>
				<td colspan="3">
					<input type="text" class="inputdiv" value="<?php echo $city; ?>" id="city" name="city" />
				</td>
			</tr>
			<tr>
				<td class="right rlabel"><label for="neighborhood"><?php echo $this->lang->line('address_neighborhood'); ?>:</label></td>
				<td colspan="3">
					<input type="text" class="inputdiv" value="<?php echo $neighborhood; ?>" id="neighborhood" name="neighborhood" />
				</td>
			</tr>
			<tr>
				<td class="right rlabel"><label for="address"><?php echo $this->lang->line('address_address'); ?>:</label></td>
				<td colspan="3">
					<input type="text" class="inputdiv" value="<?php echo $address; ?>" id="address" name="address" />
				</td>
			</tr>
			<tr>
				<td class="right rlabel"><label for="number"><?php echo $this->lang->line('address_number'); ?>:</label></td>
				<td colspan="3">
					<input type="text" size="11" class="input" maxlength="11" value="<?php echo $number; ?>" id="number" name="number" />
				</td>
			</tr>
			<tr>
				<td class="right rlabel"><label for="additional"><?php echo $this->lang->line('address_additional'); ?>:</label></td>
				<td colspan="3">
					<input type="text" class="inputdiv" value="<?php echo $additional; ?>" id="additional" name="additional" />
				</td>
			</tr>
			<tr>
				<td colspan="4" class="center">
					<label for="btnEnter"><input type="submit" id="btnEnter" class="submit" value="<?php echo $this->lang->line('address_save'); ?>" /></label>
				</td>
			</tr>
		</tbody>
	</table>
	<div id="result_ajax"></div>
	<input type="hidden" value="<?php echo $id_address; ?>" name="idaddress" id="idaddress" />
</form>
</div>
<script type="text/javascript">
getCountry('#ajaxCountry', null, '#ajaxCountry #idcountry');
getState('#ajaxState', '#ajaxCountry #idcountry');
$(".maskCEP").mask("99999-999");
<?php 
	if (isset($extrascript)) echo $extrascript;
?>
</script>